//
//  Utilities.m
//  Logistics
//
//  Created by 锋 on 2018/1/23.
//  Copyright © 2018年 HUYU. All rights reserved.
//

#import "Utilities.h"

@implementation Utilities
// 计算label 高宽
+ (CGRect)calculateWidthAndHeightWithWidth:(CGFloat)width height:(CGFloat)height text:(NSString *)text font:(UIFont *)font
{
    CGRect titleSize = [text boundingRectWithSize:CGSizeMake(width, height) options:NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesFontLeading  | NSStringDrawingUsesLineFragmentOrigin            attributes:@{NSFontAttributeName: font} context:nil];
    return titleSize;
}
@end
